<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="条码列表" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="pos-a-full shuttle-box left" style="right: 50%;top:35px">
                <div class="row wrapper-y-sm">
                    <div class="operate-bar col-xs-4 font-0">
                    </div>
                    <div class="search-bar wrapper-none col-xs-8">
                        <div class="btn-group m-l-xs pull-right">
                            <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                                <i class="yb-icon ico-refresh"></i>
                            </button>
                            <button type="button" class="btn btn-default base-color" title="配置表格列"
                                    ng-click="switchToolbar('ColConfig');">
                                <i class="yb-icon ico-set"></i>
                            </button>
                        </div>
                        <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索
                        </button>
                        <div class="input-group pull-right clearfix">
                            <input type="text" class="form-control txt-search" placeholder="零件编号"
                                   ng-model="condition.materialsNo">
                            <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                        </div>
                    </div>
                </div>
                <div yb-advance-search style="top: -45px;" show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                     reset-data="reset()">
                    <div class="advance-search m-t-sm">
                        <div class="form-group clearfix">
                            <label class="control-label">零件编号：</label>
                            <input type="text" name="mobile" class="form-control" ng-model="condition.materialsNo">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">单据号：</label>
                            <input type="text" name="name" class="form-control col-xs-8" ng-model="condition.billNo">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">出库单号：</label>
                            <input type="text" name="businessOrder" class="form-control col-xs-8" ng-model="condition.businessOrder">
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label">创建时间：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.beginDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="showDatepickerBegin = !showDatepickerBegin"
                                   ng-change="checkDate(condition, 'beginDate', 'endDate')"
                                   is-open="showDatepickerBegin" close-text="关闭" modal-size="small" readonly>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"></label>
                            <label class="control-label wave-line">~</label>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"></label>
                            <input type="text" class="form-control date-picker" ng-model="condition.endDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerEnd = !showDatepickerEnd"
                                   ng-change="checkDate(condition, 'beginDate', 'endDate')"
                                   is-open="showDatepickerEnd" close-text="关闭" modal-size="small" readonly>
                        </div>
                    </div>
                </div>
                <div yb-col-config style="top: -45px;" show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig"
                     col-fixed="true" set-tb-style="setFixedWidth()"></div>
                <div yb-table-fixed class="pos-a-full table-fixed-wrap has-head has-foot fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                            <tr>
                                <th class="border-l-none" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth" fixed-width="tbStyle.billFixedWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}" ng-click="selectRow($index)">
                                <td class="spill-dots border-l-none" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
                <div class="bottom-area page-bar wrapper-y-sm clearfix">
                    <!--<div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"-->
                         <!--yb-click="selectAll()"></div>-->
                    <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
                </div>
            </div>
            <div class="pos-a-full shuttle-box right" style="left:50%;top:35px">
                <div class="box-head" style="width: auto;">
                    <span class="font-14">
                         打印参数
                    </span>
                    <button class="btn btn-operate pull-right m-t" ng-click="switchToolbar('PrintConf')">打印配置</button>
                </div>
                <div yb-print-conf show-toolbar="toolbarConfig.showPrintConf" ng-model="tempSet"></div>
                <div class="pos-a-full box-body has-head has-foot border-t">
                    <form name="form" class="form-horizontal p-t clearfix" novalidate>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label">图号：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="orawyd" maxlength="20" class="form-control" ng-model="detailInfo.orawyd">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label">条码描述：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="barcodeDesc" maxlength="50" class="form-control" ng-model="detailInfo.barcodeDesc">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label">规格描述：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="model" maxlength="34" class="form-control" ng-model="detailInfo.model">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label"><i>*</i>总数量：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="totalQty" class="form-control" disabled ng-model="detailInfo.totalQty" ng-keyup="countPack()">
                            </div>
                        </div>
                        <div class="form-group col-xs-6 m-b-xs">
                            <label class="col-xs-4 control-label"><i>*</i>包装数量：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="packNum" class="form-control" b-number-input  ng-model="detailInfo.packNum" ng-keyup="setPackNum()">
                            </div>
                        </div>
                        <div class="pos-a-full border-t p-t-sm" style="top:160px; bottom: 10px;overflow: auto">
                            <div class="form-group" ng-repeat="item in packList track by $index">
                                <label class="col-xs-2 control-label">每包数量：</label>
                                <div class="col-xs-3 wrapper-none">
                                    <input type="text" name="vinid" class="form-control" ng-model="item.currentQty"
                                           yb-number-input  disable-decimal="false" decimal-places="3"
                                    >
                                </div>
                                <label class="col-xs-2 control-label">VIN码{{$index+1}}：</label>
                                <div class="col-xs-3 wrapper-none">
                                    <input type="text" name="vinid" class="form-control" maxlength="20" ng-model="item.vinid">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="bottom-area btn-bar text-center border-t clearfix">
                    <button type="button" class="btn btn-default m-r-sm" ng-click="previewOrPrintTicket('preview')">预览打印</button>
                    <button type="button" class="btn btn-primary" ng-click="previewOrPrintTicket('print')"
                            ng-disabled="!btnPermission.unboxingPrintPrint" title="{{!btnPermission.unboxingPrintPrint?'无权限执行此操作':''}}">打印</button>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="printXgcy" ng-include="'view/printTemplate/cyTicketTpl.html'" ng-show="false"></div>